begintownscript;
variables;
body;

beginstate INIT_STATE;
	add_range_to_group(8,15,1);
	if (get_flag(1,9) == 2)
		set_terrain(24,5,0);
break;

beginstate START_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate 10;
	if (get_flag(1,6) == 0)	{
		message_dialog("You turn suddenly as you hear a rustling in the bushes, but it was nothing.  In a different direction you hear a low growling-like sound.  Then the forest is silent.","You don't know what dwells in this forest, but you're fairly sure that it will not take a liking to you if it finds you.");
		set_flag(1,6,1);	}
break;

beginstate 11;
	if (get_flag(1,7) == 0)	{
		message_dialog("Now this is strange.  It seems you've stumbled upon some buildings in this dense forest.  They're of very crude make, most likely made by the ogres.","");
		set_flag(1,7,1);	}
break;

beginstate 12;
	if (get_flag(1,8) == 0)	{
		message_dialog("You enter into the small building, and, surprisingly, it is empty.  As you turn to leave, the door makes a 'clack!' noise and you find that it is locked.  Someone from outside must have...","Not that it matters right now.  Because, right now, a large group of ogres have somehow entered the room.  You're trapped, and you'll have to fight to survive.");
		activate_hidden_group(1);
		alert_char(1001);
		set_flag(1,8,1);
		flip_terrain(38,14);	}
break;

beginstate 13;
	if ((get_flag(1,9) == 0) && (get_flag(1,8) == 1))	{
		set_state_continue(15);	}
break;

beginstate 14;
	if (get_flag(1,9) == 1)	{
		message_dialog("Uh-oh.  Before you is a towering hill giant, often a fierce enemy.  For some reason, this one speaks to you.  _You dat un d' ogres can't trap._","_You prove you strong.  If you not fight, I move rocks for you?_  It seems he is afraid to fight you, so he offers a compromise.  You take it, because there's no other way you can move the rocks he speaks of.");
		set_flag(1,9,2);
		set_terrain(24,5,0);
		set_terrain(25,4,126);
		erase_char(7);
		message_dialog("After the hill giant clears a path, he swiftly leaves the area.","");	}
break;

beginstate 15;
	if ((get_flag(1,18) && get_flag(1,19) && get_flag(1,20) && get_flag(1,21) && get_flag(1,22) && get_flag(1,23)) == 1 )	{
		message_dialog("The door opens before you can reach it.  An ogre looks in, hoping to see your corpse surrounded by victorious ogres, but he is disappointed.  He flees before you can slay him too.","");
		flip_terrain(38,14);
		set_flag(1,9,1);
		activate_hidden_group(2);	}
break;